<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>宠物医院管理系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            font-family: 'Microsoft YaHei', sans-serif;
        }
        .hero-section {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: white;
            position: relative;
            overflow: hidden;
        }
        .hero-content {
            z-index: 2;
            position: relative;
        }
        .hero-title {
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }
        .hero-subtitle {
            font-size: 1.5rem;
            margin-bottom: 2rem;
            opacity: 0.9;
        }
        .hero-description {
            font-size: 1.1rem;
            margin-bottom: 3rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
            opacity: 0.8;
        }
        .btn-hero {
            padding: 15px 40px;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: 50px;
            margin: 0 10px;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .btn-hero:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        }
        .btn-primary-hero {
            background: rgba(255,255,255,0.2);
            border: 2px solid rgba(255,255,255,0.3);
            color: white;
        }
        .btn-primary-hero:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.5);
            color: white;
        }
        .btn-outline-hero {
            background: transparent;
            border: 2px solid rgba(255,255,255,0.5);
            color: white;
        }
        .btn-outline-hero:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.7);
            color: white;
        }
        .floating-elements {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 1;
        }
        .floating-element {
            position: absolute;
            color: rgba(255,255,255,0.1);
            animation: float 6s ease-in-out infinite;
        }
        .floating-element:nth-child(1) {
            top: 20%;
            left: 10%;
            animation-delay: 0s;
        }
        .floating-element:nth-child(2) {
            top: 60%;
            right: 10%;
            animation-delay: 2s;
        }
        .floating-element:nth-child(3) {
            bottom: 20%;
            left: 20%;
            animation-delay: 4s;
        }
        .floating-element:nth-child(4) {
            top: 30%;
            right: 30%;
            animation-delay: 1s;
        }
        .floating-element:nth-child(5) {
            bottom: 40%;
            right: 20%;
            animation-delay: 3s;
        }
        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(180deg); }
        }
        .features {
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 40px;
            margin-top: 50px;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }
        .feature-item {
            text-align: center;
            margin-bottom: 30px;
        }
        .feature-icon {
            font-size: 3rem;
            margin-bottom: 15px;
            color: rgba(255,255,255,0.8);
        }
        .feature-title {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 10px;
        }
        .feature-desc {
            opacity: 0.8;
        }
        @media (max-width: 768px) {
            .hero-title {
                font-size: 2.5rem;
            }
            .hero-subtitle {
                font-size: 1.2rem;
            }
            .btn-hero {
                padding: 12px 30px;
                font-size: 1rem;
                margin: 5px;
            }
        }
    </style>
</head>
<body>
    <div class="hero-section">
        <div class="floating-elements">
            <div class="floating-element"><i class="fas fa-paw fa-3x"></i></div>
            <div class="floating-element"><i class="fas fa-heart fa-2x"></i></div>
            <div class="floating-element"><i class="fas fa-stethoscope fa-3x"></i></div>
            <div class="floating-element"><i class="fas fa-dog fa-2x"></i></div>
            <div class="floating-element"><i class="fas fa-cat fa-2x"></i></div>
        </div>
        
        <div class="hero-content">
            <h1 class="hero-title">
                <i class="fas fa-paw me-3"></i>
                宠物医院管理系统
            </h1>
            <p class="hero-subtitle">Pet Hospital Management System</p>
            <p class="hero-description">
                专业的宠物医院管理解决方案，提供宠物档案管理、预约挂号、健康记录跟踪等全方位服务。
                让宠物医院管理更加高效、便捷、专业。
            </p>
            
            <div class="hero-buttons">
                <a href="${pageContext.request.contextPath}/pages/common/login.jsp" 
                   class="btn btn-primary-hero btn-hero">
                    <i class="fas fa-sign-in-alt me-2"></i>立即登录
                </a>
                <a href="${pageContext.request.contextPath}/pages/common/register.jsp" 
                   class="btn btn-outline-hero btn-hero">
                    <i class="fas fa-user-plus me-2"></i>注册账号
                </a>
            </div>
            
            <div class="features">
                <div class="row">
                    <div class="col-md-4">
                        <div class="feature-item">
                            <div class="feature-icon">
                                <i class="fas fa-clipboard-list"></i>
                            </div>
                            <h5 class="feature-title">宠物档案管理</h5>
                            <p class="feature-desc">完整记录宠物基本信息、健康状况、疫苗接种等档案资料</p>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="feature-item">
                            <div class="feature-icon">
                                <i class="fas fa-calendar-check"></i>
                            </div>
                            <h5 class="feature-title">预约挂号</h5>
                            <p class="feature-desc">在线预约挂号，合理安排就诊时间，提高医院服务效率</p>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="feature-item">
                            <div class="feature-icon">
                                <i class="fas fa-chart-line"></i>
                            </div>
                            <h5 class="feature-title">健康记录</h5>
                            <p class="feature-desc">详细记录诊疗过程、用药情况、复诊安排等健康信息</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 检查是否已登录，如果已登录则自动跳转
        <c:if test="${not empty sessionScope.currentUser}">
            <c:choose>
                <c:when test="${sessionScope.currentUser.userType == 'admin'}">
                    window.location.href = '${pageContext.request.contextPath}/pages/admin/dashboard.jsp';
                </c:when>
                <c:otherwise>
                    window.location.href = '${pageContext.request.contextPath}/pages/user/dashboard.jsp';
                </c:otherwise>
            </c:choose>
        </c:if>
    </script>
</body>
</html>
